<html>
<head>
    <title>Forms</title>
    <script type="text/javascript">
        function updateFocus() {
            var name = window.location.hash.substring(1);
            var element = document.getElementsByName(name)[0];

            element.focus();
        }
    </script>
</head>
<body onload="updateFocus();">
    <form>
        <input type="url" required/>
        <input type="submit" name="url_empty"/>
    </form>
    <form>
        <input type="url" value="invalid" required/>
        <input type="submit" name="url_invalid"/>
    </form>

    <form>
        <input type="email" required/>
        <input type="submit" name="email_empty"/>
    </form>
    <form>
        <input type="email" value="invalid" required/>
        <input type="submit" name="email_invalid"/>
    </form>
    <form>
        <input type="text" title="empty input" required/>
        <input type="submit" name="input_empty"/>
    </form>
    <form>
        <input type="text" pattern="Lorem ipsum" value="Lorem Ipsum" title="Should type 'Lorem ipsum'"/>
        <input type="submit" name="lorem_ipsum"/>
    </form>
</body>
</html>
